Don't die in an assertion if focus went missing. Just warn, clean up and
authorMatthias Clasen <mclasen@redhat.com>
Fri, 29 Dec 2006 19:26:34 +0000 (19:26 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Dec 2006 19:26:34 +0000 (19:26 +0000)
2006-12-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c (blink_cb):
        * gtk/gtktextview.c (blink_cb): Don't die in an assertion
        if focus went missing. Just warn, clean up and continue.
        (#374378)

ChangeLog
gtk/gtkentry.c
gtk/gtktextview.c

index a2bfd3b0ac77868e331e17bb11d85329d05ecb09..b234e26010aba5645784bd0623519fc734c41842 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-12-29  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkentry.c (blink_cb):
+       * gtk/gtktextview.c (blink_cb): Don't die in an assertion
+       if focus went missing. Just warn, clean up and continue.
+       (#374378)
+
 2006-12-29  Carlos Garnacho  <carlosg@gnome.org>
 
        * gtk/gtknotebook.c (gtk_notebook_scroll): return if the widget that
index 49bcb3b9bf7e583fd775d2c5a51f0d44b6b73287..9cfa39ae94e7224e49fd858167f04b6bbfe9d427 100644 (file)
@@ -5385,9 +5385,12 @@ blink_cb (gpointer data)
       g_warning ("GtkEntry - did not receive focus-out-event. If you\n"
                 "connect a handler to this signal, it must return\n"
                 "FALSE so the entry gets the event as well");
+
+      gtk_entry_check_cursor_blink (entry);
+
+      return FALSE;
     }
   
-  g_assert (GTK_WIDGET_HAS_FOCUS (entry));
   g_assert (entry->selection_bound == entry->current_pos);
   
   blink_timeout = get_cursor_blink_timeout (entry);
index 6980d09618d16c9321dd5908d52e52ba854475c0..5f8529e9a1deb521153a65b7632fa7f38becece1 100644 (file)
@@ -4514,10 +4514,13 @@ blink_cb (gpointer data)
       g_warning ("GtkTextView - did not receive focus-out-event. If you\n"
                  "connect a handler to this signal, it must return\n"
                  "FALSE so the text view gets the event as well");
+
+      gtk_text_view_check_cursor_blink (text_view);
+
+      return FALSE;
     }
 
   g_assert (text_view->layout);
-  g_assert (GTK_WIDGET_HAS_FOCUS (text_view));
   g_assert (text_view->cursor_visible);
 
   visible = gtk_text_layout_get_cursor_visible (text_view->layout);